package com.lagou.edu.controller;

import com.lagou.edu.pojo.Resume;
import com.lagou.edu.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
@RequestMapping("page")
public class PageController {

    /**
     * Spring容器和SpringMVC容器是有层次的（父子容器）
     * Spring容器：service对象+dao对象
     * SpringMVC容器：controller对象，，，，可以引用到Spring容器中的对象
     */



    @GetMapping("update")
    public String  upate(Resume resume,ModelAndView modelAndView) throws Exception {
        modelAndView.addObject("resume",resume);
        return "update";
    }

    @GetMapping("add")
    public String  add() throws Exception {
        return "add";
    }

    @GetMapping("login")
    public String  login() throws Exception {
        return "index";
    }



}
